home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / gui4cli / gui4cli.gc < prev    next >
Text File  |  1999-04-29  |  17KB  |  690 lines

  1. G4C
  2.  
  3. ; Gui4Cli.gc
  4. ; =================================================================
  5. ; This is the gui which is opened when you click the "Prefs" button 
  6. ; on the Gui4Cli requester. 
  7.  
  8. ; If you find yourself feeling queezy after having suffered the full
  9. ; effect of it's poping open at you unwarned, you may change it as 
  10. ; you see fit..   - set TABs to 3 -
  11.  
  12.  
  13. WINBIG 227 26 299 201 "Gui4Cli"
  14. WinType 11110001
  15.  
  16. BOX 0 0 297 201 out button
  17.  
  18. ; -----------------------------------------------------------------
  19. ;        System events
  20. ; -----------------------------------------------------------------
  21.  
  22. xOnLoad
  23.     setgadvalues gui4cli.gc        ; set default values
  24.     path = $$G4C.editor            ; update path shown
  25.     update #this 84 $path
  26.     sndfx = $*SNDGAD                ; update sound fx shown
  27.     update #this 89 $sndfx
  28.     setgad gui4cli.gc 72 off
  29.     mode = GUI
  30.     setgad #this 903 hide ; palette lv
  31.     palette = 0
  32.     lvhelp = 'Choose guis to load'
  33.     oldguidir = GUIs:
  34.     update gui4cli.gc 50 'Port: $$g4c.port'
  35.     gosub gui4cli.gc SetGuiStat ; starting state
  36.     guiopen Gui4Cli.gc
  37.  
  38. xonreload
  39.     guiopen Gui4Cli.gc
  40.     guiscreen gui4cli.gc front
  41.  
  42. xOnOpen
  43.     SetGad Gui4Cli.gc 1 OFF        ; remove the appicon
  44.     if $mode = LOAD            ; refresh stuff..
  45.        lvuse Gui4Cli.gc 10
  46.        lvdir refresh
  47.     elseif $mode = GUI
  48.        lvuse Gui4Cli.gc 54
  49.        lvdir #env:$$g4c.port
  50.     endif
  51.  
  52. xOnClose 
  53.     SetGad Gui4Cli.gc 1 ON        ; open the appicon
  54.  
  55. xOnFail
  56.     ezreq "Failed.." OK ""
  57.  
  58. xAppIcon 0 0 GUIs:Gui4Cli "Gui4Cli" apivar OFF
  59.     GadID 1
  60.     GuiOpen Gui4Cli.gc
  61.     GuiScreen Gui4Cli.gc FRONT
  62.     if $apivar > ' '
  63.     andifexists DIRECTORY $apivar    ; if a directory or volume icon was
  64.     orifexists DOS $apivar        ; dropped on the icon,
  65.         lvuse Gui4Cli.gc 10        ; we cd to it.. 
  66.         lvdir #$apivar
  67.     endif
  68.  
  69. ; ****** ENABLE THIS HOT KEY IF YOU WANT IT ******
  70. ; xHotKey "rawkey shift f1" ON    ; popup key for this gui
  71. ;    guiopen #this
  72. ;    guiscreen #this front
  73. ;    guiwindow #this front
  74.  
  75. ; -----------------------------------------------------------------
  76. ;        Mode CYCLER
  77. ;        - will rotate gui through all modes
  78. ; -----------------------------------------------------------------
  79.  
  80. XBUTTON 9 5 80 14 "Guis"
  81.     gadid 801
  82.     gadhelp '- List of loaded Guis'
  83.     gosub #this SetGuiStat    ; because it's also called from xOnLoad
  84.  
  85. xRoutine SetguiStat
  86.     mode = GUI
  87.     setgad gui4cli.gc 10 HIDE    ; the listview
  88.     setgad gui4cli.gc 50/59 SHOW    ; other lv & Open/close/quit etc
  89.     setgad gui4cli.gc 60/100 HIDE
  90.     lvuse Gui4Cli.gc 54
  91.     lvdir #env:$$g4c.port
  92.     setwintitle gui4cli.gc 'Port $$g4c.port : Home'
  93.     changearg #this 801 3 16
  94.     changearg #this 802 3 14
  95.     changearg #this 803 3 14
  96.     partredraw gui4cli.gc 4 17 291 181
  97.  
  98. XBUTTON 90 5 80 14 "Load"
  99.     gadhelp '- Load Guis'
  100.     gadid 802
  101.     mode = LOAD
  102.     setgad gui4cli.gc 10 SHOW
  103.     setgad gui4cli.gc 50/58 HIDE
  104.     setgad gui4cli.gc 59 SHOW
  105.     setgad gui4cli.gc 60/79 SHOW
  106.     setgad gui4cli.gc 80/100 HIDE
  107.     lvhelp = 'Choose guis from here'
  108.     setwintitle gui4cli.gc '$oldguidir'
  109.     changearg #this 801 3 14
  110.     changearg #this 802 3 16
  111.     changearg #this 803 3 14
  112.     partredraw gui4cli.gc 4 17 291 181
  113.  
  114. XBUTTON 171 5 80 16 "Prefs"
  115.     gadhelp '- Set general preferences'
  116.     gadid 803
  117.     mode = SET
  118.     setgad gui4cli.gc 10 HIDE
  119.     setgad gui4cli.gc 50/79 HIDE
  120.     setgad gui4cli.gc 80/89 SHOW
  121.     ; reset tab and grid
  122.     update #this 87 $$g4c.tab
  123.     update #this 86 $$g4c.grid
  124.     setwintitle gui4cli.gc 'Gui4Cli settings'
  125.     changearg #this 801 3 14
  126.     changearg #this 802 3 14
  127.     changearg #this 803 3 16
  128.     partredraw gui4cli.gc 4 17 291 181
  129.  
  130.  
  131. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  132. ; -----------------------------------------------------------------
  133. ;        GUI mode
  134. ;        Open, Close, unload GUIs...
  135. ; -----------------------------------------------------------------
  136. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  137.  
  138. ; ------ The listview
  139.  
  140. XLISTVIEW 6 66 285 132 "" guivar '' 0 DIR
  141.     gadid 54
  142.     gadfont #mono 8 000
  143.     gadhelp 'These are the guis currently loaded'
  144.     extract guivar file fname
  145.     guiopen $fname
  146.  
  147. TEXT 105 25 174 15 port 35 BOX
  148.     gadid 50
  149.  
  150. XBUTTON 15 45 20 14 "R"        ; refresh list
  151.     gadid 51
  152.     gadhelp 'Refreshes the list of loaded guis'
  153.     lvuse Gui4Cli.gc 54
  154.     lvdir refresh
  155.  
  156. XBUTTON 40 45 58 14 Open
  157.     gadid 51
  158.     gadhelp 'Will open the selected guis'
  159.     lvuse Gui4Cli.gc 54
  160.     lvmulti first
  161.     while $guivar > ''
  162.         extract guivar file fname
  163.         guiopen $fname
  164.         lvmulti next
  165.     endwhile
  166.     lvdir none
  167.  
  168. XBUTTON 100 45 58 14 Close
  169.     gadid 52
  170.     gadhelp 'Will close the selected guis'
  171.     lvuse Gui4Cli.gc 54
  172.     lvmulti first
  173.     while $guivar > ''
  174.         extract guivar file fname
  175.         guiclose $fname
  176.         lvmulti next
  177.     endwhile
  178.     lvdir none
  179.  
  180. XBUTTON 160 45 58 14 Unload
  181.     gadid 53
  182.     gadhelp 'Will quit the selected guis'
  183.     lvuse Gui4Cli.gc 54
  184.     lvmulti first
  185.     while $guivar > ''
  186.         extract guivar file fname
  187.         guiquit $fname
  188.         lvmulti next
  189.     endwhile
  190.     ; the guis won't actually quit until all commands have executed, so..
  191.     reflag = 1
  192.  
  193. xAfter
  194.     if $reflag = 1
  195.        reflag = 0
  196.        lvdir refresh
  197.     endif
  198.  
  199. XBUTTON 235 45 20 14 "A"  ; also shown in gui mode
  200.     gadhelp 'Select all items'
  201.     gadid 51
  202.     lvuse Gui4Cli.gc 54
  203.     lvdir all
  204.  
  205. XBUTTON 255 45 20 14 "N"
  206.     gadhelp 'Unselect all items'
  207.     gadid 51
  208.     lvuse Gui4Cli.gc 54
  209.     lvdir none
  210.  
  211. BOX 6 20 284 44 in button
  212.     GADID 59
  213.  
  214. CTEXT 18 27 'GUI Control' #screen 8 2 0 0001
  215.     gadid 50
  216.  
  217.  
  218. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  219. ; -----------------------------------------------------------------
  220. ;        LOAD mode
  221. ;        Load GUIs...
  222. ; -----------------------------------------------------------------
  223. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  224.  
  225. XLISTVIEW 6 66 285 132 "" guivar GUIs: 0 DIR
  226.     gadid 10
  227.     gadfont #mono 8 000
  228.     gadhelp 'Listview : $lvhelp'    ; we set it above according to mode
  229.     docase $mode
  230.       case = FAV
  231.         setgad gui4cli.gc 71 on        ; if double clicked in FAV mode
  232.         setgad gui4cli.gc 60/63 on    ; set it back to LOAD mode
  233.         setgad gui4cli.gc 72 off    ; and cd to selection
  234.         lvhelp = 'Choose guis to load'
  235.         lvmode DIR
  236.         lvdir #$guivar
  237.         mode = LOAD
  238.         break
  239.       case = LOAD
  240.         if $guivar H= G4C
  241.             guiload $guivar
  242.         endif
  243.         break
  244.     endcase
  245.     
  246. xlvdirhook 10
  247.     if $mode = LOAD
  248.         oldguidir = $$lv.dir
  249.         setwintitle gui4cli.gc '$oldguidir'
  250.     endif
  251.  
  252. ; ----- for the box use the same as above (gadid 59)
  253.  
  254. CTEXT 20 27 GuiLoad #screen 8 2 0 0001
  255.     gadid 60
  256.  
  257. XBUTTON 24 42 80 14 Load      ; load
  258.     gadhelp 'Will load the selected files if they are guis'
  259.     gadid 60
  260.     lvuse Gui4Cli.gc 10
  261.     lvmulti first
  262.     while $guivar > ''
  263.         if $guivar H= G4C
  264.            guiload $guivar
  265.         endif    
  266.         lvmulti next
  267.     endwhile
  268.     lvdir none
  269.  
  270. XBUTTON 117 42 20 14 "P"
  271.     gadhelp 'CD to Parent dir'
  272.     gadid 60
  273.     lvuse Gui4Cli.gc 10
  274.     lvdir parent
  275.     oldguidir = $$lv.dir
  276.     setwintitle gui4cli.gc '$oldguidir'
  277.  
  278. XBUTTON 138 42 20 14 "D"
  279.     gadhelp 'Show Volumes list'
  280.     gadid 60
  281.     lvuse Gui4Cli.gc 10
  282.     lvdir disks
  283.     oldguidir = ''
  284.     setwintitle gui4cli.gc 'Devices'
  285.  
  286. XBUTTON 171 42 20 14 "G"
  287.     gadhelp 'Shortcut to GUIs:'
  288.     gadid 60
  289.     lvuse Gui4Cli.gc 10
  290.     lvdir #Guis:
  291.     oldguidir = GUIs:
  292.     setwintitle gui4cli.gc 'GUIs:'
  293.  
  294. XBUTTON 117 27 20 14 "A"  ; also shown in gui mode
  295.     gadhelp 'Select all items'
  296.     gadid 60
  297.     lvuse Gui4Cli.gc 10
  298.     lvdir all
  299.  
  300. XBUTTON 138 27 20 14 "N"
  301.     gadhelp 'Unselect all items'
  302.     gadid 60
  303.     lvuse Gui4Cli.gc 10
  304.     lvdir none
  305.  
  306. ; ---------------- Favourite Loading dirs
  307.  
  308. XBUTTON 192 27 58 14 "Fav"
  309.     gadid 70
  310.     gadhelp 'Switches to and from Favourites mode'
  311.     lvuse gui4cli.gc 10
  312.     if $mode = FAV
  313.        setgad gui4cli.gc 71 on
  314.        setgad gui4cli.gc 60/63 on
  315.        setgad gui4cli.gc 72 off
  316.        lvhelp = 'Choose guis to load'
  317.        lvmode DIR
  318.        lvdir #$oldguidir
  319.        mode = LOAD
  320.     else
  321.        setgad gui4cli.gc 71 off
  322.        setgad gui4cli.gc 60/63 off
  323.        setgad gui4cli.gc 72 on
  324.        lvhelp = 'Double click on a directory, or hit FAV again to cancel'
  325.        lvmode MULTI
  326.        lvchange guis:tools/fav/G4C.fav
  327.        lvsort asc
  328.        mode = FAV
  329.     endif
  330.  
  331. XBUTTON 252 27 29 14 "+"
  332.     gadid 71
  333.     gadhelp 'Adds the current dir the Listview is at, to your favourites'
  334.     lvuse gui4cli.gc 10
  335.     append guis:tools/fav/g4c.fav '\n$$lv.dir'
  336.  
  337. XBUTTON 252 42 29 14 "-"
  338.     gadid 72
  339.     gadhelp 'Deletes selected favourite entries'
  340.     lvuse gui4cli.gc 10
  341.     lvmulti first
  342.     while $guivar > ''
  343.        lvdel -1
  344.        lvmulti first
  345.     endwhile
  346.  
  347. XBUTTON 192 42 58 14 "Save"
  348.     gadid 72
  349.     gadhelp 'Save favourites to GUIs:tools/fav/G4C.fav'
  350.     lvuse gui4cli.gc 10
  351.     lvsave guis:tools/fav/g4c.fav
  352.  
  353.  
  354. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  355. ; -----------------------------------------------------------------
  356. ;    ===================== Gui4Cli Settings ==================
  357.  
  358. ;        Set general Gui4Cli preferences
  359. ; -----------------------------------------------------------------
  360. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  361.  
  362. BOX 9 81 278 39 in button
  363.     gadid 80
  364.  
  365. CTEXT 18 24 'Settings:' #screen 8 2 0 0001
  366.     gadid 80
  367.  
  368. ; ------------ Outside players
  369.  
  370. XBUTTON 15 39 94 14 "Players.."
  371.     gadid 85
  372.     gadhelp 'Configure External players'
  373.     ifexists variable *DEF.EDITOR
  374.        else
  375.        guiload guis:tools/prefs/players
  376.     endif
  377.     guiload guis:tools/config.gc
  378.  
  379. ; ------------ Palette
  380.  
  381. XPALETTE 15 54 52 16 
  382.     gadid 81
  383.     gadhelp 'Loads the GUIs:tools/palette.gc gui'
  384.     guiload guis:tools/palette.gc
  385.     guiopen palette.gc
  386.  
  387. XLISTVIEW 2 0 210 92 "" palfile guis:tools/palette 10 DIR
  388.     gadid 903 ; hide it at load
  389.  
  390. XBUTTON 63 54 30 15 ">"        ; next palette..
  391.     gadhelp 'Load next palette from Guis:Tools/Palette'
  392.     gadid 81
  393.     lvuse #this 903
  394.     if $palette >= $$lv.tot
  395.         palette = 0
  396.     endif
  397.     lvgo #$palette
  398.     lvmulti none
  399.     lvmulti on
  400.     lvmulti first
  401.     guiload $palfile Gui4Cli.gc
  402.     ++palette
  403.  
  404. ; ------------ Debug, help, tab & grid
  405.  
  406. XCHECKBOX 246 54 25 15 "Debug" dbg "1" "0" OFF
  407.     gadid 80
  408.     gadhelp 'Sets DEBUG mode On/Off (state will not be saved)'
  409.     if $dbg = 1
  410.        set debug on
  411.     else
  412.        set debug off
  413.     endif
  414.  
  415. XCHECKBOX 162 54 25 15 Help hlp "1" "0" OFF
  416.     gadid 80
  417.     gadhelp 'Sets HELP On/Off (state will not be saved)'
  418.     if $hlp = 1
  419.        set help on
  420.     else
  421.        set help off
  422.     endif
  423.  
  424. XHSLIDER 162 24 90 14 Grid grid 1 20 1 "%ld"
  425.     gadid 86
  426.     gadhelp 'Sets the size of the Edit Grid'
  427.     set grid $grid
  428.  
  429. XHSLIDER 162 39 90 14 "Tabs" tab 0 20 8 "%ld"
  430.     gadid 87
  431.     gadhelp 'Sets the TAB size'
  432.     set tab $tab
  433.  
  434. ; -----------------------------------------------------------------
  435. ;        Path & settings 
  436. ; -----------------------------------------------------------------
  437.  
  438. BOX 9 20 276 56 IN BUTTON
  439.     gadid 83
  440.  
  441. CTEXT 18 84 'Set Paths:' #screen 8 2 0 0001
  442.     gadid 83
  443.  
  444. XTEXTIN 18 99 259 15 "" path '' 140
  445.     gadid 84
  446.     gadhelp 'Enter the new path etc here..'
  447.     set $setpath $path
  448.  
  449. XCYCLER 117 84 161 14 "" setpath
  450.     gadid 83
  451.     gadhelp 'Cycles through the various things you can set.'
  452.     CSTR 'Editor'        'editor'
  453.     CSTR 'File Pattern'    'filepattern'
  454.     cstr 'GuiFile Pattern'    'guipattern'
  455.     cstr 'Gui Load dir'    'guiloaddir'
  456.     cstr 'Default Screen'    'defscreen'
  457.     CSTR 'Output'        'output'
  458.     temp = '\$\$G4C.$setpath'
  459.     update gui4cli.gc 84 '$temp'
  460.  
  461. ; -----------------------------------------------------------------
  462. ;        Sound effects
  463. ; -----------------------------------------------------------------
  464.  
  465. BOX 9 168 280 27 IN BUTTON
  466.     gadid 85
  467.  
  468. CTEXT 21 129 "Set Sounds:" "#screen" 8 2 0 "0001"
  469.     gadid 85
  470.  
  471. XCYCLER 117 129 128 14 "" sfxevent
  472.     gadhelp 'Cycles through the events you can set sounds for.'
  473.     gadid 85
  474.     cstr Gadget        '*SNDGAD'
  475.     CSTR Open        '*SNDOPEN'
  476.     CSTR Close        '*SNDCLOSE'
  477.     cstr RMB            '*SNDRMB'
  478.     cstr Keyboard    '*SNDKEY'
  479.     sampname = \$$sfxevent ; ie '$*SNDGAD'
  480.     update #this 89 $sampname
  481.  
  482. XCHECKBOX 249 129 29 14 "" usefx ON OFF ON
  483.      gadhelp 'Checked = enable all sound effects. Unchecked = disable'
  484.      gadid 88
  485.      ; unload all currently loaded samples (if any)
  486.      freesound SNDGAD
  487.      freesound SNDOPEN
  488.      freesound SNDCLOSE
  489.      freesound SNDRMB
  490.      freesound SNDKEY
  491.      if $usefx = OFF
  492.          stop
  493.      endif
  494.      ; load new ones
  495.      if $*SNDGAD > ''
  496.          loadsound $*SNDGAD SNDGAD
  497.          set SNDGAD SNDGAD
  498.      endif
  499.      if $*SNDOPEN > ''
  500.          loadsound $*SNDOPEN SNDOPEN
  501.          set SNDOPEN SNDOPEN
  502.      endif
  503.      if $*SNDCLOSE > ''
  504.          loadsound $*SNDCLOSE SNDCLOSE
  505.          set SNDCLOSE SNDCLOSE
  506.      endif
  507.      if $*SNDRMB > ''
  508.          loadsound $*SNDRMB SNDRMB
  509.          set SNDRMB SNDRMB
  510.      endif
  511.      if $*SNDKEY > ''
  512.          loadsound $*SNDKEY SNDKEY
  513.          set SNDKEY SNDKEY
  514.      endif
  515.  
  516. XTEXTIN 18 144 227 15 "" sndfx '' 140
  517.     gadhelp 'Enter the sample you want for this effect'
  518.     gadid 89
  519.     update #this 88 0 ; checkbox off
  520.     $sfxevent = $sndfx
  521.  
  522. XBUTTON 249 144 29 15 '<'
  523.     gadhelp 'Opens requester so you can choose sample'
  524.     gadid 85
  525.     reqfile -1 -1 300 -40 'Choose Sample:' LOAD sndfx guis:tools/samp
  526.     $sfxevent = $sndfx
  527.     update #this 89 $sndfx 
  528.     update #this 88 0 ; checkbox off
  529.  
  530.  
  531. ; If you add stuff, give them an id of 85...
  532.  
  533. ; -----------------------------------------------------------------
  534. ;        Save prefs
  535. ; -----------------------------------------------------------------
  536.  
  537. BOX 9 126 279 39 IN BUTTON
  538.     gadid 85
  539.  
  540. XBUTTON 144 174 127 14 "Save prefs"
  541.     gadhelp 'Save all above settings in file Guis:Gui4Cli.prefs'
  542.     gadid 85
  543.  
  544.     delete guis:gui4cli.prefs        ; if it existed..
  545.  
  546.     .temp = 'G4C\n\n; Generated by Gui4Cli.gc on $$sys.date\n\nxONLOAD\n'
  547.     if $palfile > ''
  548.         append env:.temp 'GuiLoad $palfile Gui4Cli.prefs\n'
  549.     endif
  550.  
  551.     ; set paths
  552.     append env:.temp '\n; Paths\n'
  553.     append env:.temp 'Set TAB $tab\nSet GRID $grid\n'
  554.     append env:.temp 'Set EDITOR $$G4C.EDITOR\n'
  555.     append env:.temp 'Set FILEPATTERN $$G4C.FILEPATTERN\n'
  556.     append env:.temp 'Set GUIPATTERN $$G4C.GUIPATTERN\n'
  557.     append env:.temp 'Set GUILOADDIR $$G4C.GUILOADDIR\n'
  558.     append env:.temp 'Set DEFSCREEN $$G4C.DEFSCREEN\n'
  559.     append env:.temp 'Set OUTPUT $$G4C.OUTPUT\n'
  560.  
  561.     ; set sound effects
  562.     if $usefx = ON
  563.         append env:.temp '\n; Sound fx\n'
  564.  
  565.         ; free old ones (not really needed)
  566.         append env:.temp 'freesound SNDGAD\nfreesound SNDOPEN\nfreesound SNDCLOSE\nfreesound SNDRMB\nfreesound SNDKEY\n'
  567.  
  568.          if $*SNDGAD > ''
  569.              append env:.temp 'loadsound $*SNDGAD SNDGAD\n'
  570.              append env:.temp 'set SNDGAD SNDGAD\n'
  571.              append env:.temp '*SNDGAD = $*SNDGAD\n'
  572.          endif
  573.          if $*SNDOPEN > ''
  574.              append env:.temp 'loadsound $*SNDOPEN SNDOPEN\n'
  575.              append env:.temp 'set SNDOPEN SNDOPEN\n'
  576.              append env:.temp '*SNDOPEN = $*SNDOPEN\n'
  577.          endif
  578.          if $*SNDCLOSE > ''
  579.              append env:.temp 'loadsound $*SNDCLOSE SNDCLOSE\n'
  580.              append env:.temp 'set SNDCLOSE SNDCLOSE\n'
  581.              append env:.temp '*SNDCLOSE = $*SNDCLOSE\n'
  582.          endif
  583.          if $*SNDRMB > ''
  584.              append env:.temp 'loadsound $*SNDRMB SNDRMB\n'
  585.              append env:.temp 'set SNDRMB SNDRMB\n'
  586.              append env:.temp '*SNDRMB = $*SNDRMB\n'
  587.          endif
  588.          if $*SNDKEY > ''
  589.              append env:.temp 'loadsound $*SNDKEY SNDKEY\n'
  590.              append env:.temp 'set SNDKEY SNDKEY\n'
  591.              append env:.temp '*SNDKEY = $*SNDKEY\n'
  592.          endif
  593.     endif
  594.  
  595.     append env:.temp '\nGuiQuit #this\n'
  596.     copy env:.temp GUIs:Gui4Cli.prefs
  597.     delete env:.temp
  598.  
  599. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  600. ; -----------------------------------------------------------------
  601. ;        ========================== Menus
  602. ; -----------------------------------------------------------------
  603. ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  604.  
  605. xMenu Project New.. '' N        ; new gui
  606.     guiclose gui4cli.gc
  607.     guiload guis:tools/guiedit.gc
  608.     gosub guiedit.gc newfile
  609.     if $$ret.0 = 1                ; a gui was chosen
  610.        guiopen guiedit.gc
  611.     endif
  612.  
  613.     xmenu Project Gui.. '' ''        ; use the status requester
  614.     status
  615.  
  616. xMenu Project BARLABEL '' ''
  617.  
  618. xMenu Project #guis:Gui4Cli '' ''
  619.     ezreq 'Gui4Cli\n(c)1995-99 D.Keletsekis\ndck@hol.gr' 'OK' ''
  620.  
  621. xMenu Project 'Quit Gui' '' ''
  622.     guiquit gui4cli.gc
  623.  
  624. xMenu Project 'Quit Gui4Cli' '' ''
  625.     quit
  626.  
  627. ; --------------- guis menu
  628.  
  629. xMenu Guis "File Manager   " '' ''
  630.     guiload guis:dir/dir.gc
  631.     guiopen dir.gc
  632.     guiclose gui4cli.gc
  633.  
  634. xMenu Guis FSearch.gc '' ''
  635.     guiload guis:g4c/fsearch/fsearch.gc Sys:
  636.     guiclose gui4cli.gc
  637.  
  638. xMenu Guis Rep.gc '' ''
  639.     guiload guis:g4c/rep.gc
  640.     guiclose gui4cli.gc
  641.  
  642. xMenu Guis CedBar.gc '' ''
  643.     guiload guis:g4c/ced/cedbar.gc
  644.     guiclose gui4cli.gc
  645.  
  646. xMenu Guis "BARLABEL" '' ''
  647.  
  648. xMenu Guis Demo '' ''
  649.     guiload guis:demo.gc
  650.     guiopen demo.gc
  651.     guiclose gui4cli.gc
  652.  
  653. xMenu Guis Tutorials '' ''
  654.     guiload guis:docs/tutorials.gc
  655.     guiopen tutorials.gc
  656.     guiclose gui4cli.gc
  657.  
  658.  
  659. ; --------------- Help menu
  660.  
  661. xMenu Help "Gui4Cli Guide " '' ''
  662.     run 'multiview guis:docs/gui4cli.guide'
  663.  
  664. xMenu Help "BARLABEL" '' ''
  665.  
  666. xMenu Help "Gui4Cli ReadMe" '' ''
  667.     guiload guis:tools/read.gc guis:readme.now
  668.  
  669. xMenu Help "Command List" '' ''
  670.     guiload guis:tools/read.gc guis:docs/PrintMe
  671.  
  672. xMenu Help "Version Changes" '' ''
  673.     guiload guis:tools/read.gc guis:docs/Changes
  674.  
  675. xMenu Help "BARLABEL" '' ''
  676.  
  677. xMenu Help "CLI Commands Guide    " '' ''
  678.     run 'multiview guis:docs/CLICommands.guide'
  679.  
  680. xMenu Help "Routines Guide" '' ''
  681.     run 'multiview guis:docs/Routines.guide'
  682.  
  683. xMenu Help "BARLABEL" '' ''
  684.  
  685. xMenu Help Tutorials.. '' ''
  686.     guiload guis:docs/tutorials.gc
  687.     guiopen tutorials.gc
  688.  
  689.  
  690.